<html>
	<head>
		{% if title %}
		<title> {{title}} - microblog </title>
		{% else %}
		<title> Welcome to microblog </title>
		{% endif %}
	</head>
	<body>
	<div> Microblog: <a href="{{ url_for('index') }}">Home</a></div>
		<div>
			{% if g.user %}
			  Hi {{ g.user.username }}!
				<a href="{{ url_for('logout') }}">logout</a>
			{% else %}
				<a href="{{ url_for('login') }}">login</a>
			{% endif %}
		</div>
		<hr>
		{% with messages = get_flashed_messages() %}
		{% if messages %}
		<ul>
			{% for message in messages %}
			<li>{{ message }} </li>
			{% endfor %}
		</ul>
		{% endif %}
		{% endwith %}
		{% block content %} {% endblock %}
	<body>
</html>
